package dptest;

public class t91 {

	public static void main(String[] args) {
	String s = "226";
	char srr[] = s.toCharArray();
	if(srr[0] == '0') {
		System.out.print(0);
		//return 0;
	}
	int dp [] = new int [s.length()+1];
	dp[0] = 1;
	for(int i = 1; i<=s.length(); i++) {
		if(srr[i-1] >'0') {
			dp[i] +=dp[i-1];
		}
		if(i>1) {
			int res = ( (srr[i-2] - '0'))*10 + srr[i-1]-'0';
			if(res>=10 && res<=26) {
				dp[i]+=dp[i-2];
			}
		}
	}
	System.out.println(dp[srr.length]);
	//return (dp[s.length()]);

	}

}
